package chapter01

object Test20_While {
  def main(args: Array[String]): Unit = {
    var i = 1
    scala.util.control.Breaks.breakable{
      while(i<=5){
        println(i)
        if(i==3){
          scala.util.control.Breaks.break
        }
        i += 1
      }
    }
  }
}
